package controllers;

import java.awt.Color;
import java.awt.Font;
import javax.swing.ImageIcon;

/**
 * This class holds the rules and settings for the OBL system.
 * @author Alon Shahaf
 * @Data 12.01.13 
 */

public class OBLSettings 
{
	
	// Sizes & Locations
	public final static int[] pane1Size = {404,355}; 		// Width size ,Height size (used for connect)
	public final static int[] pane2Size = {800,600}; 		// Width size ,Height size (all other windows except the server)
	public final static int[] frameLocation = {100,100}; 	// x location,y location
	
	// Fonts & Colors
	public final static Font textFont = new Font("Tahoma", Font.PLAIN, 15);				// Regular text
	public final static Color textColor = Color.BLACK;									// Regular text
	public final static Font labelFont = new Font("Tahoma", Font.PLAIN, 15);			// Labels
	public final static Font headlinesTextFont = new Font("Tahoma", Font.BOLD, 20);		// Upper banner
	public final static Color headlinesTextColor = Color.BLACK;							// Upper banner
	public final static Font titlesTextFont = new Font("Tahoma", Font.PLAIN, 15);		// Titles of the panels
	public final static Color titlesTextColor = Color.BLACK;							// Titles of the panels      
	public final static Font buttonTextFont = new Font("Tahoma", Font.PLAIN, 15);		// Non-Menu Buttons text
	public final static Font buttonMenuTextFont = new Font("Tahoma", Font.BOLD, 15);	// Menu Buttons text
	
	// Images
	public final static ImageIcon IMG_DEFAULT_BACKGROUND = 			 new ImageIcon("images/background4.jpg");
	public final static ImageIcon IMG_SERVER_BACKGROUND = 			 new ImageIcon("images/ServerUI Background.jpg");
	public final static ImageIcon IMG_CLIENT_CONNECTION_BACKGROUND = new ImageIcon("images/connection background.jpg");
	public final static ImageIcon IMG_CLIENT_LOGIN_BACKGROUND = 	 new ImageIcon("images/Login Background.jpg");
	public final static ImageIcon IMG_SUBSCRIBER_SEARCH_BOOK_BACKGROUND = 	new ImageIcon("images/subscriber/subscriberSearchBookUI background.jpg");
	public final static ImageIcon IMG_SUBSCRIBERUI_BACKGROUND1 = 	new ImageIcon("images/subscriber/subscriberUI background1.jpg");
	public final static ImageIcon IMG_SUBSCRIBERUI_BACKGROUND2 = 	new ImageIcon("images/subscriber/subscriberUI background2.jpg");
	public final static ImageIcon IMG_ADMIN_BACKGROUND = new ImageIcon("images/admin.jpg");
	
	public final static ImageIcon IMG_LIBRARIAN_USER_BOOK_COPY = new ImageIcon("images/librarian/book.jpg");
	public final static ImageIcon IMG_LIBRARIAN_UI = new ImageIcon("images/librarian/lib1.jpg");
	public final static ImageIcon IMG_MANAGERMAINUI = new ImageIcon("images/manager/managerMainUIbackground.jpg");
	public final static ImageIcon IMG_MANAGERSuspendSubscriber = new ImageIcon("images/manager/suspendSubscriber.jpg");	
	
	// Time simulation
	public final static int MS_MULTIPLIER 			= 2880;	//2880;			// The seconds multiplier for the simulation. 2880 seconds will ultimately give us 30sec=1day
	public final static String txtClockFilePath 	= "clock/clock.txt";	// Text file to save simulation time when server shuts down.
	
	// Mailer
	public final static String MAIL_USER			= "obl.system";				// The user name for the mailer
	public final static String MAIL_PASS			= "AndroidRules";			// The password for the mailer
	public final static String MAIL_ADDR			= MAIL_USER+"@gmail.com";	// The actual email address
	
	// Jobs Manager
	public final static int HOUR					= 8;							// Hour to start the Job.
	public final static int MIN						= 0;							// Minute to start the Job.
	public final static int SEC						= 0;							// Second to start the Job.
	public final static int MS						= 0;							// Milliseconds to start the Job.
	public final static long INTERVAL				= 86400000L / MS_MULTIPLIER;//MS_MULTIPLIER*1000*60*60*24L; // The interval between each Job.
	
	// Librarian Rules:
	public final static int MANUAL_EXT_MAX_DAYS 	= 7;	// Max days allowed to extend an active borrow using the manual extension. 
	public final static int BORROW_STANDARD_DAYS	= 14;	// Max days allowed for a borrow of a 'NON-WANTED' book.
	public final static int BORROW_WANTED_DAYS		= 3;	// Max days allowed for a borrow of a 'WANTED' book.
	public final static boolean MANUAL_EXT_WANTED	= false;// Allow manual extension for "wanted" books?
	
	// Subscriber Rules:
	public final static int FineForLatnnessDay 		= 10;   // The fine for 1 day of lateness for book return.
	public final static int FineForLoosingBook 		= 100;	// The fine for loosing a book.
	public final static int ExtendPiriodForBorrow 	= 7;	// The Extend period for borrow (7 days).
	
	// TOC
	public final static String TOC_SERVER_PATH		= "D://obl//";
	public final static String TOC_CLIENT_PATH		= "D://client//";
	public final static int TOCfileSize =  16777216; //The size of the TOC file in bytes.
										
	
	
}